package mop.exception;


/**
 * Exception class for reservations that conflict with task schedule
 * 
 * @author	 MOP Team 7
 */

public class IllegalReservationScheduleException extends Throwable  {

	

	/**
	 * Initializes an IllegalReservationException
	 */
	public IllegalReservationScheduleException()
	{

	}
	
	/**
	 * Return a error message that can be used by the gui
	 * @return An error message describing the incorrect name
	 */
	public String toString()
	{
		StringBuffer sb = new StringBuffer();
		sb.append("Reservation is invalid due to due to one or more of following reasons:  \n");
		sb.append("The reservation must start after or on the same moment as the task start date.\n");
		sb.append("The reservation must overlap with other reservations for at least the duration of the task.\n");
		return sb.toString();
	}
	
	 
	/**
	 * Weird java demand
	 */
	private static final long serialVersionUID = 1L;
		
	
}
